package com.haikesi.api.device.domain.vo;

import com.haikesi.api.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
public class DeviceSearchVO implements Serializable {
    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "订阅账号ID")
    private String deviceSubscriberId;
    @ApiModelProperty(value = "订阅账号")
    private String deviceSubscriberNumber;
    @ApiModelProperty(value = "设备类型码")
    private String productCode;
    @ApiModelProperty(value = "设备类型名称")
    private String productCodeName;
    @ApiModelProperty(value = "设备序列号")
    private String serialNum;
    @ApiModelProperty(value = "设备mac地址")
    private String deviceMac;
    @ApiModelProperty(value = "设备名称")
    private String deviceName;
    @ApiModelProperty(value = "设备别名")
    private String deviceAlias;
    @ApiModelProperty(value = "设备位置ID")
    private String positionId;
    @ApiModelProperty(value = "组织机构ID")
    private String sorganizationId;
    @ApiModelProperty(value = "组织机构ID",hidden = true)
    private String organizationId;

    @ApiModelProperty(value = "页数")
    private Integer pageNum;
    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if(pageNum == null){
            pageNum = 1;
        }
        return pageNum;
    }
    public Integer getPageSize() {
        if(pageSize == null){
            pageSize = 20;
        }
        /*if(pageSize > 100){
            pageSize = 100;
        }*/
        return pageSize;
    }

}